﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace CommonManagement
{
    /// <summary>
    /// 积分等级控制器
    /// </summary>
    [Authorize]
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/commonManagement/levels")]
    public class LevelController : AbpController, ILevelAppService
    {
        private readonly ILevelAppService _levelAppService;

        public LevelController(
            ILevelAppService levelAppService)
        {
            _levelAppService = levelAppService;
        }

        // 列表
        [HttpGet]
        [Route("list")]
        public Task<ListResponse<LevelDto>> ListAsync()
        {
            return _levelAppService.ListAsync();
        }
    }
}